/*
 * Copyright 2010-2012 Susanta Tewari. <freecode4susant@users.sourceforge.net>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package genomemap.netbeans.jobs1.ksa00;

import cef.command.Command;
import cef.command.EstimateModelCommand;
import cef.command.listener.EstimateModelPrintWriter;
import cef.pui.EventConstructionException;
import commons.nb.jobs.Job;
import commons.nb.jobs.properties.BuilderProperty;
import commons.nb.jobs.properties.ComboPropertyImpl;
import genomemap.cef.pui.EstimateModelKSA00EventImpl;
import genomemap.nb.jobs.properties.Propertys_Gen;

/**
 * @author Susanta Tewari
 * @history First created on May 29, 2012
 */
public class EstimateModelKSA00Job extends Job<EstimateModelKSA00EventImpl> {

    public EstimateModelKSA00Job() {

        setName("estimate-model=ksa00");
        setDisplayName("Estimate KSA00");
        setShortDescription("Estimates model KSA00");


        // data
        final BuilderProperty ksa00data_property = Propertys_Gen.BUILDER_DATA_KSA00Data();

        addComboProperty(new ComboPropertyImpl(ksa00data_property));
        addComboProperty(ksa00data_property);


        // ESTIMATOR
        addComboProperty(new ComboPropertyImpl(Propertys_Gen.ESTIMATORS_KSA00()));


        // attach listeners
        addCommandOutputListener(new EstimateModelPrintWriter());
    }

    @Override
    protected EstimateModelKSA00EventImpl createEvent() throws EventConstructionException {
        return new EstimateModelKSA00EventImpl(getProperties());
    }

    @Override
    protected Command createCommand(final EstimateModelKSA00EventImpl event) {
        return new EstimateModelCommand<>(event);
    }

    @Override
    public boolean isCancellable() {
        return false;
    }

    @Override
    public Class<EstimateModelKSA00EventImpl> getEventImplType() {
        return EstimateModelKSA00EventImpl.class;
    }
}
